package net.url;

import java.net.URL;
import java.net.URLConnection;

public class AllHeaders
{
	public static void main(String[] args)
	{
		try
		{
			URL u = new URL("http://www.taobao.com");
			URLConnection uc = u.openConnection();
			for (int i = 0; ; i++)
			{
				String header = uc.getHeaderField(i);
				System.out.println(header);
				if(header==null)
				{
					break;
				}
			}
		}
		catch (Exception e)
		{
		}
	}
}
